package com.ruoyi.agencyfund.factory;

import com.ruoyi.agencyfund.service.CustomerFeignService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.customer.domain.OrderContract;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletResponse;
@Component
public class CustomerFeignServiceFallbackFactory implements FallbackFactory<CustomerFeignService> {
    @Override
    public CustomerFeignService create(Throwable cause) {
        return new CustomerFeignService(){

            @Override
            public TableDataInfo list(OrderContract orderContract) {
                return null;
            }



            @Override
            public AjaxResult getInfo(Long orderNumber) {
                return AjaxResult.error("服务降级");
            }


            @Override
            public AjaxResult edit(OrderContract orderContract) {
                return AjaxResult.error("服务降级");
            }

            @Override
            public AjaxResult remove(Long[] orderNumbers) {
                return AjaxResult.error("服务降级");
            }
        };
    }
}
